fix flush of a closed file handle
authorJoey Hess <joeyh@joeyh.name>
Fri, 30 Sep 2022 18:02:31 +0000 (14:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 30 Sep 2022 18:02:31 +0000 (14:02 -0400)
Avoids displaying warning about git-annex restage needing to be run in
situations where it does not.

Closing a handle flushes it anyway, so no need for an explict flush. The
handle does get closed twice, but that's fine, the second one does nothing.

Sponsored-by: Dartmouth College's DANDI project
CHANGELOG
Git/UpdateIndex.hs
doc/bugs/windows__58___needlessly_reminded_to_run___96__restage__96__.mdwn

index e805419551a19601573c16ef1b8c13680176b082..e077b498ad3ee7aa45b833436e9078ef8bb493b1 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,10 @@
+git-annex (10.20220928) UNRELEASED; urgency=medium
+
+  * Avoid displaying warning about git-annex restage needing to be run
+    in situations where it does not.
+
+ -- Joey Hess <id@joeyh.name>  Fri, 30 Sep 2022 13:54:23 -0400
+
 git-annex (10.20220927) upstream; urgency=medium
 
   * Fix a bug in the last release that caused v8 repositories to upgrade
index ee34afe983956ce93b7255b4da771984052c9187..0ac21617fbdbce27f135584592494c83c1067707 100644 (file)
@@ -160,7 +160,6 @@ refreshIndex repo feeder = bracket
 
        go (Just h, _, _, pid) = do
                let closer = do
-                       hFlush h
                        hClose h
                        forceSuccessProcess p pid
                feeder $ \case
index bc1bbf8a5003b5654c784837a0c4c8841a09a1a2..4b4c10d4d433cb4fc0373250e8eb07e7880594fa 100644 (file)
@@ -178,3 +178,5 @@ Git Annex is great. I use it several times a week with my multigigabyte backups,
 Big thanks, Joey!
 
 [[!meta author=jkniiv]]
+
+> [[fixed|done]] --[[Joey]]